package com.two.screen.water.balance.bean.water

class ProductBean {
    var productName: String? = null
    var productUnitPrice: String? = null
    var id: String? = null
    var hangId: String? = null
    var batchId: String? = null
    var productImage: String? = null
    var status = 0
    var productSpecs = 0
    var deliveryTime: String? = null
    var supplierName: String? = null


    //var isGoWeight = false//是否过称
    var roughWeight = 0.0//毛重
    var peelWeight = 0.0//皮重
    var netWeight = 0.0//净重
    var subTotalPrice = 0.0//小计
    var isSelectedLocal = false

    companion object {
        val SPECS_PRODUCT_INSTALL_DING = 1//定装
        val SPECS_PRODUCT_INSTALL_DING_NO = 2//非定装
        val SPECS_PRODUCT_INSTALL_SAN = 3//散装

        fun getSpecsProductName(spec: Int?): String {
            return when (spec) {
                SPECS_PRODUCT_INSTALL_DING -> "定装"
                SPECS_PRODUCT_INSTALL_DING_NO -> "非定装"
                SPECS_PRODUCT_INSTALL_SAN -> "散装"
                else -> "未知"
            }
        }

        fun getSpecsProductName2Item(spec: Int): String {
            return when (spec) {
                SPECS_PRODUCT_INSTALL_DING -> "(定装)"
                SPECS_PRODUCT_INSTALL_DING_NO -> "(非定装)"
                SPECS_PRODUCT_INSTALL_SAN -> "(散装)"
                else -> ""
            }
        }

        fun isDingInstall(spec: Int?): Boolean {
            return spec == SPECS_PRODUCT_INSTALL_DING
        }

        fun isNoDingInstall(spec: Int?): Boolean {
            return spec == SPECS_PRODUCT_INSTALL_DING_NO
        }

        fun isSanInstall(spec: Int?): Boolean {
            return spec == SPECS_PRODUCT_INSTALL_SAN
        }
    }
}

/*购物车 记录 选中 商品*/

class SelectedProductBean {
    var productName: String? = null
    var productUnitPrice: String? = null
    var id: String? = null
    var batchId: String? = null
    var productImage: String? = null
    var status = 0
    var productSpecs = 0
    var deliveryTime: String? = null
    var supplierName: String? = null


    var roughWeight = 0.0//毛重
    var peelWeight = 0.0//皮重
    var netWeight = 0.0//净重
    var isSelectedLocal = false

}